import React, {Component} from 'react';
import {
    Text,
    View,
    TouchableOpacity,
} from 'react-native';

export default class OverlayInRemind extends Component {
    constructor(props) {
        super(props);
    }
    closeOverlay=()=>{
        if(this.props.closeOverlay){
            this.props.closeOverlay("close")}
    };
    render(){
        return(
            <View style={{backgroundColor: Theme.defaultColor, minWidth: 260, minHeight: 120,
                borderRadius: 15, justifyContent: 'center', alignItems: 'center'}}>
                <View style={{flex:1,justifyContent:'center',alignItems:'center',width:230}}>
                    <Text style={{textAlign:'center',lineHeight:20,color:'#000'}}>{this.props.text}</Text>
                </View>
                <View style={{height:0.5,width:260,backgroundColor:'#e2e2e3'}}/>
                <TouchableOpacity
                    onPress={()=>this.closeOverlay()}
                    style={{width:260,height:44,justifyContent:'center',alignItems:'center'}}>
                    <Text style={{color:'#000'}}>知道了</Text>
                </TouchableOpacity>
            </View>
        );
    }
}

